import Vue from "vue";

import "normalize.css/normalize.css"; // A modern alternative to CSS resets

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

import "@/assets/styles/index.scss"; // global css

import App from "./App";
import store from "./store";
import router from "./router";

// 初始化websocket
import websocket from "./utils/socket";
Vue.prototype.$socket = websocket;

// 初始化审核
import ant from "ant-design-vue";
import "ant-design-vue/dist/antd.min.css";
import DrawFlow from "./components/DrawFlow";
Vue.use(ant);
Vue.use(DrawFlow);

import VueAMap from '@vuemap/vue-amap';
import '@vuemap/vue-amap/dist/style.css'
Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
  key: "2999d50054676da0b4db0f824296a88c", // 必填项
});

import "@/icons"; // icon
import "@/permission"; // permission control
import { hasRule } from "@/utils/permissions"; // button control
Vue.prototype.$hasRule = hasRule;

import VueClipboard from "vue-clipboard2";
Vue.use(VueClipboard);

// set ElementUI lang to EN
// Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
Vue.use(ElementUI, {
  size: "mini",
});

Vue.config.productionTip = false;

new Vue({
  el: "#app",
  router,
  store,
  render: (h) => h(App),
});
